package
{
	import com.evola.dbsm.model.UserBean;
	import com.evola.dbsm.utils.Session;
	import com.evola.dbsm.view.login.LoginView;
	
	import mx.managers.PopUpManager;

	[Bindable]
	public class MainPresenter
	{

		public var model:MainModel;
		public var view:EvolaDBScriptManager;

		public function MainPresenter()
		{
			
		}
		
		public function showLogin() : void{
			
			var loginView : LoginView = new LoginView();
			
			PopUpManager.addPopUp(loginView, view, true);
			PopUpManager.centerPopUp(loginView);
		}
		
		public function login(user : UserBean) : void{

			Session.user = user;
			
			Presenters.navigationPresenter.showProjects();
		}
		
	}
}
